home *** CD-ROM | disk | FTP | other *** search
/ Joystick Magazine 1995 July & August / cd No4 joystick No62.iso / mac / pc / SHARE / LIGHTLIB / LANGUAGE.Z / LLO.H < prev    next >
C/C++ Source or Header  |  1995-01-27  |  6KB  |  125 lines

  1. #include <windows.h>
  2.  
  3. #define EXPORTED                                __export FAR PASCAL
  4. typedef LPVOID                                  LLOBJECT;
  5.  
  6. // LIBRARY
  7. #define LLO_LIBRARY_OBJECT                      0x00000000
  8.  
  9. // CLASS
  10. #define LLO_CLASS_CONTEXT                       LLO_LIBRARY_OBJECT + 0x00000000
  11. #define LLO_CLASS_ABSTRACT                      LLO_LIBRARY_OBJECT + 0x00010000
  12. #define LLO_CLASS_ERROR                         LLO_LIBRARY_OBJECT + 0x00020000
  13. #define LLO_CLASS_APPLICATION                   LLO_LIBRARY_OBJECT + 0x00030000
  14.  
  15. // GENERIC CLASS / PROPERTY
  16. #define LLO_ABSTRACT_APPLICATION                LLO_CLASS_ABSTRACT + 0x0101
  17. #define LLO_ABSTRACT_OWNER                      LLO_CLASS_ABSTRACT + 0x0102
  18. #define LLO_ABSTRACT_LIBRARY_ID                 LLO_CLASS_ABSTRACT + 0x0211
  19. #define LLO_ABSTRACT_LIBRARY_NAME               LLO_CLASS_ABSTRACT + 0x0212
  20. #define LLO_ABSTRACT_LIBRARY_VERSION            LLO_CLASS_ABSTRACT + 0x0213
  21. #define LLO_ABSTRACT_CLASS_ID                   LLO_CLASS_ABSTRACT + 0x0221
  22. #define LLO_ABSTRACT_CLASS_NAME                 LLO_CLASS_ABSTRACT + 0x0222
  23. #define LLO_ABSTRACT_CLASS_VERSION              LLO_CLASS_ABSTRACT + 0x0223
  24. #define LLO_ABSTRACT_ON_ERROR                   LLO_CLASS_ABSTRACT + 0x0301
  25. #define LLO_ABSTRACT_CARGO                      LLO_CLASS_ABSTRACT + 0x0401
  26. #define LLO_ABSTRACT_CARGO_COUNT                LLO_CLASS_ABSTRACT + 0x0402
  27. #define LLO_ABSTRACT_CARGO_POINTER              LLO_CLASS_ABSTRACT + 0x0403
  28.  
  29. // ERROR CLASS / PROPERTY
  30. #define LLO_ERROR_OBJECT                        LLO_CLASS_ERROR + 0x0001
  31. #define LLO_ERROR_ACTION                        LLO_CLASS_ERROR + 0x0002
  32. #define LLO_ERROR_PROPERTY                      LLO_CLASS_ERROR + 0x0003
  33. #define LLO_ERROR_PROPERTY_NAME                 LLO_CLASS_ERROR + 0x0004
  34. #define LLO_ERROR_NUMBER                        LLO_CLASS_ERROR + 0x0005
  35. #define LLO_ERROR_MESSAGE                       LLO_CLASS_ERROR + 0x0006
  36. #define LLO_ERROR_PARAM                         LLO_CLASS_ERROR + 0x0007
  37.  
  38. // APPLICATION CLASS / PROPERTY
  39. #define LLO_APPLICATION_HANDLE                  LLO_CLASS_APPLICATION + 0x0001
  40. #define LLO_APPLICATION_NAME                    LLO_CLASS_APPLICATION + 0x0002
  41. #define LLO_APPLICATION_CONTEXT                 LLO_CLASS_APPLICATION + 0x0003
  42. #define LLO_APPLICATION_CARGO_COUNT_DEFAULT     LLO_CLASS_APPLICATION + 0x0004
  43. #define LLO_APPLICATION_NATION                  LLO_CLASS_APPLICATION + 0x0005
  44. #define LLO_APPLICATION_TASK                    LLO_CLASS_APPLICATION + 0x0006
  45. #define LLO_APPLICATION_MESSAGE                 LLO_CLASS_APPLICATION + 0x0007
  46. #define LLO_APPLICATION_OPTION_BASE             LLO_CLASS_APPLICATION + 0x0008
  47. // ERRORS
  48. #define LLO_ERROR_NO_ERROR                      LLO_LIBRARY_OBJECT + 0
  49. #define LLO_ERROR_INVALID_CLASS_DEFINE          LLO_LIBRARY_OBJECT + 1001
  50. #define LLO_ERROR_INVALID_OWNER_TYPE            LLO_LIBRARY_OBJECT + 1002
  51. #define LLO_ERROR_INVALID_PARAMETERS            LLO_LIBRARY_OBJECT + 1003
  52. #define LLO_ERROR_INVALID_ACCESS_NEW            LLO_LIBRARY_OBJECT + 1101
  53. #define LLO_ERROR_INVALID_ACCESS_DEL            LLO_LIBRARY_OBJECT + 1102
  54. #define LLO_ERROR_INVALID_ACCESS_ACCESS         LLO_LIBRARY_OBJECT + 1103
  55. #define LLO_ERROR_INVALID_ACCESS_ASSIGN         LLO_LIBRARY_OBJECT + 1104
  56. #define LLO_ERROR_INVALID_ACCESS_INVOKE         LLO_LIBRARY_OBJECT + 1105
  57. #define LLO_ERROR_INVALID_ACCESS_COPY           LLO_LIBRARY_OBJECT + 1106
  58. #define LLO_ERROR_MEMORY_ALLOCATION             LLO_LIBRARY_OBJECT + 2000
  59. #define LLO_ERROR_OBJECT_ACCESS_DENIED          LLO_LIBRARY_OBJECT + 3100
  60. #define LLO_ERROR_OBJECT_ASSIGN_DENIED          LLO_LIBRARY_OBJECT + 3200
  61. #define LLO_ERROR_READONLY_PROPERTY             LLO_LIBRARY_OBJECT + 4000
  62. #define LLO_ERROR_UNDEFINED_PROPERTY            LLO_LIBRARY_OBJECT + 5000
  63. #define LLO_ERROR_CARGO_OUT_OF_LIMIT            LLO_LIBRARY_OBJECT + 6000
  64. #define LLO_ERROR_PROFESSIONAL_VERSION_ONLY     LLO_LIBRARY_OBJECT + 9101
  65. #define LLO_ERROR_DEMO_LIMIT_EXCEEDED           LLO_LIBRARY_OBJECT + 9201
  66.  
  67. // ACTIONS
  68. #define LLO_ACTION_NEW                          0x01
  69. #define LLO_ACTION_DEL                          0x02
  70. #define LLO_ACTION_ACCESS                       0x03
  71. #define LLO_ACTION_ASSIGN                       0x04
  72. #define LLO_ACTION_INVOKE                       0x05
  73. #define LLO_ACTION_COPY                         0x06
  74.  
  75. #define LLO_COPY_CLONE                          0x01
  76. #define LLO_COPY_BLOB                           0x11
  77. #define LLO_COPY_UNBLOB                         0x12
  78.  
  79. #define LLO_MESSAGE_ERROR_NONE                  0x00
  80. #define LLO_MESSAGE_ERROR_BEEP                  0x01
  81. #define LLO_MESSAGE_ERROR_BOX                   0x02
  82.  
  83. extern LLOBJECT EXPORTED
  84.     oNew(                           // Function Object New
  85.         DWORD           dwClass,
  86.         LLOBJECT        lloParent,
  87.         int             iSizeOfCargo,
  88.         DWORD           dwValue,
  89.         DWORD           dwExtraParam
  90.         );
  91.  
  92. extern LLOBJECT EXPORTED
  93.     oDel(                           // Function Object Delete
  94.         LLOBJECT        lloObject
  95.         );
  96.  
  97. extern DWORD   EXPORTED
  98.     oAccess(                        // Function Object Access
  99.         LLOBJECT        lloObject,
  100.         DWORD           dwProperty,
  101.         DWORD           dwExtraParam
  102.         );
  103.  
  104. extern DWORD   EXPORTED
  105.     oAssign(                        // Function Object Assign
  106.         LLOBJECT        lloObject,
  107.         DWORD           dwProperty,
  108.         DWORD           dwValue,
  109.         DWORD           dwExtraParam
  110.         );
  111.  
  112. extern DWORD   EXPORTED
  113.     oInvoke(                        // Function Object New
  114.         LLOBJECT        lloObject,
  115.         DWORD           dwMethod,
  116.         DWORD           dwExtraParam
  117.         );
  118.  
  119. typedef DWORD ( CALLBACK * FP_ERROR )       \
  120.     (                                       \
  121.         LLOBJECT        lloObject           \
  122.     );
  123.  
  124.  
  125.